home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre0.z / postgre0 / bin / ipcclean < prev    next >
Encoding:
Text File  |  1993-05-06  |  494 b   |  20 lines

  1. #!/bin/sh
  2.  
  3. IPCS=ipcs
  4. # $IPCS | egrep '^m .*|^s .*' | egrep "`whoami`|postgres|picasso" | \
  5. # awk '{printf "ipcrm -%s %s\n", $1, $2}' '-' > /tmp/ipcclean.$$
  6.  
  7. $IPCS -m | egrep '^[0-9].*'"`whoami`|postgres|picasso" | \
  8. awk '{printf "ipcrm shm %s\n", $1}' > /tmp/ipcclean.$$
  9.  
  10. $IPCS -s | egrep '^[0-9].*'"`whoami`|postgres|picasso" | \
  11. awk '{printf "ipcrm sem %s\n", $1}' >> /tmp/ipcclean.$$
  12.  
  13.  
  14. chmod +x /tmp/ipcclean.$$
  15. if (test -s /tmp/ipcclean.$$)
  16. then
  17.     /tmp/ipcclean.$$
  18. fi
  19. rm -f /tmp/ipcclean.$$
  20.